//
//  YHShoppingMallBuyOtherCell.m
//  YHApp
//
//  Created by -- on 2021/8/21.
//

#import "HAShoppingMallBuyOtherCell.h"

@interface HAShoppingMallBuyOtherCell ()

/***/
@property (nonatomic, strong) UIView *mainV;
/***/
@property (nonatomic, strong) UIView *lineView;
/***/
@property (nonatomic, strong) UILabel *titLabel;
/***/
@property (nonatomic, strong) UILabel *conLabel;

@end

@implementation HAShoppingMallBuyOtherCell

-(void)setTitText:(NSString *)titText {
    _titText = titText;
    
    self.titLabel.text = _titText;
}

-(void)setConText:(NSString *)conText {
    _conText = conText;
    
    self.conLabel.text = _conText;
}

-(void)layoutSubviews {
    [super layoutSubviews];
    
    self.contentView.backgroundColor = [UIColor khaBGColor];
    
    [self.mainV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.right.mas_equalTo(0);
        make.top.mas_equalTo(0);
        make.bottom.mas_equalTo(0);
    }];
    
    [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20);
        make.right.mas_equalTo(-20);
        make.height.mas_offset(0.8);
        make.bottom.mas_equalTo(0);
    }];
    
    [self.titLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20);
        make.centerY.mas_equalTo(0);
        make.width.mas_offset(120);
    }];
    
    [self.conLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-20);
        make.centerY.mas_equalTo(0);
        make.left.mas_equalTo(self.titLabel.mas_right);
    }];

}

- (UIView *)mainV
{
    if (!_mainV) {
        _mainV = [UIView ha_createView];
        _mainV.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:_mainV];
    }
    return _mainV;
}


- (UILabel *)titLabel
{
    if (!_titLabel) {
        _titLabel = [UILabel ha_NLabelWithFont:18 textColor:@"#000000" text:@"" alignment:0];
        [self.mainV addSubview:_titLabel];
    }
    return _titLabel;
}

- (UILabel *)conLabel
{
    if (!_conLabel) {
        _conLabel = [UILabel ha_NLabelWithFont:15 textColor:@"#858b9c" text:@"" alignment:2];
        [self.mainV addSubview:_conLabel];
    }
    return _conLabel;
}


- (UIView *)lineView
{
    if (!_lineView) {
        _lineView = [UIView ha_createView];
        _lineView.backgroundColor = [UIColor kLineColor];
        [self.mainV addSubview:_lineView];
    }
    return _lineView;
}

@end
